package com.ama.service.impl;

import com.ama.dao.RoomDao;
import com.ama.pojo.Room;
import com.ama.service.RoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoomServiceImpl implements RoomService {
    @Autowired
    private RoomDao roomDao;

    @Override
    public int deleteById(Long roomId) {
        return roomDao.deleteById(roomId);
    }

    @Override
    public int insertRoom(Room room) {
        return roomDao.insertRoom(room);
    }

    @Override
    public int insertSelective(Room room) {
        return roomDao.insertSelective(room);
    }

    @Override
    public Room selectById(Long roomId) {
        return roomDao.selectById(roomId);
    }

    @Override
    public List<Room> selectByBuildId(Long buildId) {
        return roomDao.selectByBuildId(buildId);
    }

    @Override
    public int updateByIdSelective(Room room) {
        return roomDao.updateByPrimaryKeySelective(room);
    }

    @Override
    public int updateById(Room room) {
        return roomDao.updateById(room);
    }
}
